<%@ Control Language="C#"   Inherits="CVCommunity.Admin.Groups" %>
<%@ Register tagPrefix="forum" namespace="CVCommunity.Provider" assembly="CVCommunity.Provider"%>

<form id="Form1" runat="server" onsubmit="return checknumber();">
<div class="grid">
<table cellspacing="0" class="inner">
<tr class="forumno category">
<td>用户组管理</td>
</tr>
<tr class="forumtd" style="background:#FFFFFF;">
<td><a href="?action=groups&operation=list">&rsaquo;&rsaquo;&nbsp;用户组列表</a>&nbsp;&nbsp;&nbsp;<a href="?action=groups&operation=addgroup">&rsaquo;&rsaquo;&nbsp;添加用户组</a></td>
</tr>
</table>
<asp:Panel ID="managelist" runat="server"  Visible="false">
<table cellspacing="0" class="inner" style="text-align:center">
<tr class="forumtd" style="background:#D2E9FF; color:#000000">
<td width="30">删</td>
<td width="200">用户组名称</td>
<td width="50">星星数</td>
<td>组头像</td>
<td width="60">权限设置</td>
</tr>
<asp:Repeater enableviewstate="false" id="managegrouplist" runat="server">
<ItemTemplate>
<tr class="forumtd" style="font-size:12px;">
<td class="smallbox"><forum:Span id="box" runat="server" /></td>
<td><forum:Span id="name" runat="server" /></td>
<td><forum:Span id="stars" runat="server" /></td>
<td><forum:Span id="avatar" runat="server" /></td>
<td><forum:Anchor id="permission" text="详情" runat="server" /></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
</asp:Panel>
</div>
<div class="grid">
<asp:Panel ID="memberlist" runat="server"  Visible="false">
<table cellspacing="0" class="inner" style="text-align:center">
<tr class="forumno" style="background:#E8FAD3;color:#000000">
<td width="30">删</td>
<td width="200">用户组名称</td>
<td width="50">星星数</td>
<td width="60">积分限制</td>
<td>组头像</td>
<td width="60">权限设置</td>
</tr>
<asp:Repeater enableviewstate="false" id="membergrouplist" runat="server">
<ItemTemplate>
<tr class="forumtd" style="font-size:12px">
<td class="smallbox"><forum:Span id="box" runat="server" /></td>
<td><forum:Span id="name" runat="server" /></td>
<td><forum:Span id="stars" runat="server" /></td>
<td><forum:Span id="lowestcredit" runat="server" /></td>
<td><forum:Span id="avatar" runat="server" /></td>
<td><forum:Anchor id="permission" text="详情" runat="server" /></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
</asp:Panel>
</div>
<div class="grid">
<asp:Panel ID="speciallist" runat="server" Visible="false">
<table cellspacing="0" class="inner" style="text-align:center">
<tr class="forumno" style="background:#FDFCDF; color:#000000">
<td width="30">删</td>
<td width="200">用户组名称</td>
<td width="50">星星数</td>
<td>组头像</td>
<td width="60">权限设置</td>
</tr>
<asp:Repeater enableviewstate="false" id="specialgrouplist" runat="server">
<ItemTemplate>
<tr class="forumtd" style="font-size:12px">
<td class="smallbox"><forum:Span id="box" runat="server" /></td>
<td><forum:Span id="name" runat="server" /></td>
<td><forum:Span id="stars" runat="server" /></td>
<td><forum:Span id="avatar" runat="server" /></td>
<td><forum:Anchor id="permission" text="详情" runat="server" /></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div style="padding:5px; clear:both; text-align:center" class="forumtd"><asp:Button ID="btn3" Text="  提 交  " CssClass="button" runat="server" OnClick="Delete" /></div>
</asp:Panel>
</div>
<asp:Panel ID="addgroup" runat="server" Visible="false">
<script>

function onchangegroup(g)
{
    if (g != "3")
        document.getElementById("lowestcreditrow").style.display = "none";
    else
        document.getElementById("lowestcreditrow").style.display = "";
        
}
</script>
<table cellpadding="4" cellspacing="1">
<tr>
<td>用户组所属类</td>
<td><select name="grouptype" onchange="onchangegroup(this.options[this.selectedIndex].value)">
<option value="3" selected="selected">会员组</option>
<option value="2">特殊组</option>
<option value="1">管理组</option>
</select></td>
</tr>
<tr>
<td>新用户组的名称</td>
<td><asp:TextBox id="name" maxlength="100" style="width:180px" runat="server"/>
<font>*
<asp:RequiredFieldValidator ControlToValidate="name" ErrorMessage="请填写用户组的名称" runat="server" EnableClientScript="true" />
</font></td>
</tr>
<tr id="lowestcreditrow">
<td>积分限制/最小积分</td>
<td><asp:TextBox id="lowestcredit" text="0" maxlength="10" style="width:80px" runat="server"/>
<font>* 非会员组类可以不设置为“0”。
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" ControlToValidate="lowestcredit" ValidationExpression="\d+" ErrorMessage="请填写数字" runat="server" EnableClientScript="true" />
</font></td>
</tr>
<tr>
<td>级别/星星数</td>
<td><asp:TextBox id="stars" text="0" maxlength="10" style="width:80px" runat="server"/>
<font>*
<asp:RegularExpressionValidator ControlToValidate="stars" ValidationExpression="\d+" ErrorMessage="请填写数字" runat="server" EnableClientScript="true" />
</font></td>
</tr>
<tr>
<td>名称渲染颜色</td>
<td><asp:TextBox id="color" text="#000000" maxlength="10" style="width:80px" runat="server"/>
*
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="color" ValidationExpression="#[\d|a-f|A-F]{6}" ErrorMessage="请正确填写颜色值，如 #FF0000" runat="server" EnableClientScript=true /></td>
</tr>
<tr>
<td>组头像</td>
<td><asp:TextBox id="avatar" maxlength="100" style="width:180px" runat="server"/></td>
</tr>
<tr>
<td></td>
<td><asp:Button ID="Button3" Text="  提 交  " runat="server" OnClick="Add" /></td>
</tr>
</table>
</asp:Panel>
</form>
